package cn.stylefeng.guns.sys.modular.system.service;

import cn.stylefeng.guns.base.pojo.page.LayuiPageInfo;
import cn.stylefeng.guns.sys.modular.system.entity.Area;
import cn.stylefeng.guns.sys.modular.system.entity.MouldBoardMsg;
import cn.stylefeng.guns.sys.modular.system.entity.Project;
import cn.stylefeng.guns.sys.modular.system.entity.TaskStatus;
import cn.stylefeng.guns.sys.modular.system.model.params.ProDataViewParam;
import cn.stylefeng.guns.sys.modular.system.model.params.ProjectParam;
import cn.stylefeng.guns.sys.modular.system.model.result.ProjectResult;
import cn.stylefeng.roses.core.reqres.response.ResponseData;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springframework.http.ResponseEntity;
import org.springframework.transaction.annotation.Transactional;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.text.ParseException;
import java.util.List;
import java.util.Map;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author jiangge
 * @since 2020-09-10
 */
public interface ProjectService extends IService<Project> {

    /**
     * 新增
     *
     * @author jiangge
     * @Date 2020-09-10
     */
    void add(ProjectParam param);

    void addH5(ProjectParam param,Long userId);

    /**
     * 删除
     *
     * @author jiangge
     * @Date 2020-09-10
     */
    void delete(ProjectParam param);

    /**
     * 更新
     *
     * @author jiangge
     * @Date 2020-09-10
     */
    void update(ProjectParam param);

    /**
     * 查询单条数据，Specification模式
     *
     * @author jiangge
     * @Date 2020-09-10
     */
    ProjectResult findBySpec(ProjectParam param);

    /**
     * 查询列表，Specification模式
     *
     * @author jiangge
     * @Date 2020-09-10
     */
    List<ProjectResult> findListBySpec(ProjectParam param);

    /**
     * 查询分页数据，Specification模式
     *
     * @author jiangge
     * @Date 2020-09-10
     */
     LayuiPageInfo findPageBySpec(ProjectParam param) throws ParseException;

    LayuiPageInfo adminList(ProjectParam param) throws ParseException;

    /**
     * 推送消息给开发总监
     * @param proid
     * @return
     * @author gyz
     * @date 2020/9/18 10:14:06
     */
    void pushMsg2KFZJ(Integer proid, TaskStatus ts);

    /**
     * 推送消息给开发区域经理
     * @param proid
     * @return
     */
    void pushMsg2KFQYJL(Integer proid, TaskStatus ts,String qyjlPhone);

    void pushMsg2KFZJH5(Integer proid, TaskStatus ts,Long userId);
    /**
     * 推送消息给工程总监
     * @param proid
     * @return
     * @author gyz
     * @date 2020/9/18 10:14:06
     */
    void pushMsg2GCZJ(Integer proid, TaskStatus ts);

    void pushMsg2GCZJH5(Integer proid, TaskStatus ts,Long userId);
    /**
     * 推送消息给营运总监
     * @param proid
     * @return
     * @author gyz
     * @date 2020/9/18 10:14:06
     */
    void pushMsg2YYZJ(Integer proid, TaskStatus ts);

    void pushMsg2YYZJH5(Integer proid, TaskStatus ts,Long userId);

    /**
     * 通知开发人员驳回
     * @param proid 工程id
     * @param taskid 任务id
     * @param ts 审核结果
     */
    void pushMsg2KFRY(Integer proid, Integer taskid, TaskStatus ts);

    void pushMsg2KFRYH5(Integer proid, Integer taskid, TaskStatus ts,Long userId);

    /**
     * 通知开发人员审核通过
     * @param proid
     * @param taskid
     * @param ts
     */
    void pushKFRY(Integer proid, Integer taskid, TaskStatus ts);

    void pushKFRYH5(Integer proid, Integer taskid, TaskStatus ts,Long userId);

    void pushMsg2KFRYadmin(Integer proid, Integer taskid, TaskStatus ts);

    void pushMsg2KFZJadmin(Integer proid, TaskStatus ts);

    void pushMsg2GCZJadmin(Integer proid, TaskStatus ts);

    void pushMsg2YYZJadmin(Integer proid, TaskStatus taskt);

    @Transactional(rollbackFor = Exception.class)
    void saveGcyyjlAdmin(ProjectParam record);

    void saveGcyyjl(ProjectParam record);

    ResponseData saveGcWxyyjl(ProjectParam record);

    void saveGcDd(ProjectParam record);


    ResponseData saveGcWxDd(ProjectParam record);

    /**
     * 查询微信推送督导及营运经理
     * @return
     */
    Map<String, String> selectDd(Integer proid);

    /**
     * 查询督导列表
     */
    List<Map> selectDdList(String phone);

    /**
     * 查询营运经理列表
     * @return
     */
    List<Map> selectYyjlList();

    /**
     * 查询表格列表
     * @return
     */
    List<MouldBoardMsg> selectMsgList(Integer proId, Integer mouldId);

    /**
     * 工程完工
     * @param proId
     * @return
     */
    ResponseData getStatus(Integer proId);

    LayuiPageInfo getAllProPageWithTaskFlow(ProjectParam param);

    LayuiPageInfo getAllProject(ProjectParam param);

    List<Map<String, Object>> customMapList(ProjectParam param);

    /**
     * 批量隐藏接口
     * @param id
     * @param status
     */
    int editBatch(String id, Integer status);

    ProjectResult selectOneByParam(ProjectParam projectParam);

    LayuiPageInfo projectList(ProjectParam projectParam);

    int getName(String name);

    LayuiPageInfo jindu(ProjectParam param);

    LayuiPageInfo cokeReportList(ProjectParam param);

    ResponseEntity<byte[]> jinduExport(HttpServletRequest request, HttpServletResponse response, ProjectParam param);

    List<Area> getAreaByType();

    /**
     * 收银系统报表
     * @param param
     * @return
     */
    LayuiPageInfo sYList(ProjectParam param);

    LayuiPageInfo wsjdReportList(ProjectParam param);

    List<Map> selectDdListAll();

    List<Map> selectDzListAll();

    ResponseData addFinishItem(ProjectParam param);

    ResponseData addFinishSx(ProjectParam param);

    LayuiPageInfo listFinish(ProjectParam param) throws ParseException;

    ResponseEntity<byte[]> areaSummaryExport(HttpServletRequest request, HttpServletResponse response, ProjectParam param);

    /*
     * 获取工程妖码
     */
    void setYaoma(Integer id);

    LayuiPageInfo yaomaList(ProjectParam param);

    ResponseEntity<byte[]> yaomaListExport(HttpServletRequest request, HttpServletResponse response, ProjectParam param);

    boolean yaomaExist(ProjectParam param);

    List<TaskStatus> listgcsToStop(ProjectParam param);

    List<Integer> findBusinessShopIdsList();

    List<Map<String, Object>>  findBusinessShopList(ProDataViewParam param);

    List<ProjectResult> h5List(ProjectParam param);

    Page<ProjectResult> h5Lists(ProjectParam param);

    LayuiPageInfo h5Listss(ProjectParam param,HttpServletRequest request) throws ParseException;


    Integer gcbFinish(ProjectParam param);

    Integer ddFinish(ProjectParam param);

    LayuiPageInfo projectWjcList(ProjectParam param);

    Object wjcList();

    List<Project> projectCloseList();

    LayuiPageInfo confirmList(ProjectParam param);

    LayuiPageInfo syShopList(ProjectParam param);

    List<Map>qyjlList();
}
